<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');

//广告模型
class Adv_model extends CI_Model{

	const TBL_ADV = 'adv';

	#添加广告
	public function add_adv($data){
		return $this->db->insert(self::TBL_ADV,$data);
	}

	#查询商品品牌
	public function list_adv(){
		$query = $this->db->get(self::TBL_ADV);
		return $query->result_array();
	}

	#统计商品的数量
    public function count_adv(){
        return $this->db->count_all_results(self::TBL_ADV);
    }


}